#include <stdio.h>

#include "matrix.h"

int
main(void)
{
	Matrix A = matrix(3, 3);
	Matrix B = matrix(3, 3);

	A.a[0][0] = 0;
	A.a[0][1] = 1;
	A.a[0][2] = 2;
	A.a[1][0] = 3;
	A.a[1][1] = 4;
	A.a[1][2] = 5;
	A.a[2][0] = 6;
	A.a[2][1] = 7;
	A.a[2][2] = 8;

	B.a[0][0] = 1;
	B.a[0][1] = 0;
	B.a[0][2] = 0;
	B.a[1][0] = 0;
	B.a[1][1] = 1;
	B.a[1][2] = 0;
	B.a[2][0] = 0;
	B.a[2][1] = 0;
	B.a[2][2] = 1;

	printf("Print matrix:\n");
	print(A);
	printf("\n");

	printf("Print matrix:\n");
	print(B);
	printf("\n");

	printf("Print the sum of the two previous matrices:\n");
	print(add(A, B));
	printf("\n");

	printf("Print the product of the two previous matrices:\n");
	print(mul(A, B));
	printf("\n");

	printf("Print the transposed product of the two previous matrices:\n");
	print(transp(mul(A, B)));
	printf("\n");

	die(&A);
	die(&B);

	return 0;
}
